Skip to content

fix(export): Handle exceptions when reading file content and ignore whitespace-only files#3214

Merged
susnux merged 1 commit intomainfrom
fix/s3_export
Mar 15, 2026
Merged

fix(export): Handle exceptions when reading file content and ignore whitespace-only files#3214
susnux merged 1 commit intomainfrom
fix/s3_export

Conversation

@Chartman123
Copy link
Collaborator

This fixes #3175 by adding a check if the file really has content.

Signed-off-by: Christian Hartmann chris-hartmann@gmx.de

@Chartman123 Chartman123 added bug Something isn't working php PHP related ticket 3. to review Waiting for reviews labels Mar 9, 2026
@Chartman123 Chartman123 self-assigned this Mar 9, 2026
@Chartman123 Chartman123 requested a review from susnux March 9, 2026 22:50
@Chartman123
Copy link
Collaborator Author

@sheyaln could you please try this fix? I don't have access to an instance that uses S3 storage

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Service/SubmissionService.php 57.14% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Chartman123
Copy link
Collaborator Author

/backport to stable5.2

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Mar 10, 2026
@sheyaln
Copy link

sheyaln commented Mar 10, 2026

@sheyaln could you please try this fix? I don't have access to an instance that uses S3 storage

Apologies, how do you recommend I test this fix?

@Chartman123
Copy link
Collaborator Author

You can go to the Forms app directory on your server and manually patch the lib/service/SubmissionService.php file with the changes from this PR. Make a backup of the original file. You can also apply the patch file https://github.com/nextcloud/forms/pull/3214.patch

Copy link
Collaborator

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, just to small comments

@Chartman123
Copy link
Collaborator Author

Nice, just to small comments

@susnux thanks for the review, comments are resolved now :)

…hitespace-only files

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
@susnux susnux merged commit dfd5178 into main Mar 15, 2026
58 checks passed
@susnux susnux deleted the fix/s3_export branch March 15, 2026 11:31
@backportbot backportbot bot removed the backport-request Pending backport by the backport-bot label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working feature: 📊 responses & statistics php PHP related ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to link results to sheets

3 participants